package com.unlp.distribuida.configuration;

import org.rrest.core.filesystem.FileSystemManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import org.springframework.remoting.rmi.RmiProxyFactoryBean;

@Configuration
public class RmiClientConfiguration {

	@Bean
	@DependsOn(value = "fileSystemRmi")
	public RmiProxyFactoryBean getClientRMI() {
		RmiProxyFactoryBean rmi = new RmiProxyFactoryBean();
		rmi.setServiceInterface(FileSystemManager.class);
		rmi.setServiceUrl("rmi://localhost:1099/fileSystemManager");
		return rmi;
	}

}
